package com.etc.aop.staticproxy;

/**
 * 代理类 代替ClassGrass完成送花，送手表，送辣条等等 也就是说ClassGrass能做什么，他都要代理
 * 
 * @author Administrator
 *
 */
public class ClassGrassProxy implements IGiveGift {

	// 要有一个ClassGrassProxy代理的对象ClassGrass做为属性
	private ClassGrass cg;

	public ClassGrassProxy(ClassGrass cg) {
		super();
		this.cg = cg;
	}

	@Override
	public void giveFlower() {
		// TODO Auto-generated method stub
		System.out.println("...........before......");
		cg.giveFlower();
		System.out.println("...........after......");

	}

	@Override
	public void giveLaTiao() {
		// TODO Auto-generated method stub
		cg.giveLaTiao();

	}

	@Override
	public void giveWatch() {
		// TODO Auto-generated method stub
		cg.giveWatch();

	}
}
